#   SCE CONFIDENTIAL
#   PLAYSTATION(R)3 Programmer Tool Runtime Library 192.001
#   Copyright (C) 2005 Sony Computer Entertainment Inc.
#   All Rights Reserved.
#


#----------------------------------------------------------------------
# Cg targets
#----------------------------------------------------------------------

FPSHADER_SRCS       += $(FPSHADER_SOURCES)
VPSHADER_SRCS       += $(VPSHADER_SOURCES)

FPSHADER_OBJS       = $(patsubst %.cg, %.fpo, $(FPSHADER_SRCS))
VPSHADER_OBJS       = $(patsubst %.cg, %.vpo, $(VPSHADER_SRCS))

CG_CLEAN_OBJS       = $(strip $(FPSHADER_OBJS) $(VPSHADER_OBJS))

TARGET              +=  $(FPSHADER_OBJS) $(VPSHADER_OBJS)

#----------------------------------------------------------
# Build rules for pu
#----------------------------------------------------------

$(FPSHADER_OBJS): %.fpo: %.cg
	$(PSGL_CGC) $(FPSHADER_QUIET) -profile $(FPSHADER_PROFILE) $(FPSHADER_FLAGS) -o $@ $<

$(VPSHADER_OBJS): %.vpo: %.cg
	$(PSGL_CGC) $(VPSHADER_QUIET) -profile $(VPSHADER_PROFILE) $(VPSHADER_FLAGS) -o $@ $<

.PHONY: cg-clean

cg-clean:
ifneq ($(CG_CLEAN_OBJS),)
	$(RM) $(CG_CLEAN_OBJS)
endif


